package day01;

/**
 * @author feng
 * @Date 2021/10/13 15:57
 *  懒汉模式:在类加载时未调用，在创建实例时才会创建对象
 */
public class SinletonTest02 {

    private SinletonTest02(){}

    private static SinletonTest02 sinleton = null;

    public SinletonTest02 newInstance(){
        return sinleton;
    }

    public static void main(String[] args) {
        SinletonTest02 test02 = new SinletonTest02();
        System.out.println(test02.newInstance());
    }
}
